package com.example.gss.entity;

import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 社会服务实体类，对应数据库中的socialservice表
 */
@Data
public class SocialService implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    private String serviceId;     // 服务ID
    private String studentId;     // 学号
    private String type;          // 类型(学生干部/活动参与/志愿服务等)
    private String position;      // 职务(如研究生会主席等)
    private String activityName;  // 活动名称
    private String duration;      // 持续时间(学年/学期)
    private BigDecimal score;     // 计算得分

    // 无参构造函数
    public SocialService() {
    }

    // 有参构造函数
    public SocialService(String serviceId, String studentId, String type,
                         String position, String activityName, String duration,
                         BigDecimal score) {
        this.serviceId = serviceId;
        this.studentId = studentId;
        this.type = type;
        this.position = position;
        this.activityName = activityName;
        this.duration = duration;
        this.score = score;
    }

    // 重写toString方法
    @Override
    public String toString() {
        return "SocialService{" +
                "serviceId='" + serviceId + '\'' +
                ", studentId='" + studentId + '\'' +
                ", type='" + type + '\'' +
                ", position='" + position + '\'' +
                ", activityName='" + activityName + '\'' +
                ", duration='" + duration + '\'' +
                ", score=" + score +
                '}';
    }
}